package com.alpha.utils.msg;

public class PageParameter {
    public static final int DEFAULT_PAGE_SIZE = 20;

    /**
     * 每页记录数（pageSize）
     */
    private int rows;

    /**
     * 页码
     */
    private int page;

    /**
     * 总页数
     */
    private long totalPage;

    /**
     * 总记录数
     */
    private long totalCount;


    public PageParameter() {
        this.page = 1;
        this.rows = 10;
    }

    public PageParameter(int currentPage, int pageSize) {
        this.page = currentPage;
        this.rows = pageSize;
    }

    public int getPage() {
        return this.page;
    }

    public void setPage(int currentPage) {
        this.page = currentPage;
    }

    public int getRows() {
        return this.rows;
    }

    public void setRows(int pageSize) {
        this.rows = pageSize;
    }

    public long getTotalPage() {
        return this.totalPage;
    }

    public void setTotalPage(long totalPage) {
        this.totalPage = totalPage;
    }

    public long getTotalCount() {
        return this.totalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public String toString() {
        return "PageParameter{rows=" + this.rows + ", page=" + this.page + ", totalPage=" + this.totalPage + ", totalCount=" + this.totalCount + '}';
    }
}
